package cn.jingyuan.swan.system.model;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.*;

/**
 * 对 org.springframework.security.oauth2.provider.client.BaseClientDetails 的透传
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class ClientDetails implements Serializable {

    String clientId;

    String clientSecret;

    Set<String> scope = Collections.emptySet();

    Set<String> resourceIds = Collections.emptySet();

    Set<String> authorizedGrantTypes = Collections.emptySet();

    // Set<String> registeredRedirectUris  =Collections.emptySet();
    Set<String> registeredRedirectUris;

    Set<String> autoApproveScopes;

    List<SimpleAuthority> authorities = Collections.emptyList();

    Integer accessTokenValiditySeconds;

    Integer refreshTokenValiditySeconds;

    Map<String, Object> additionalInformation = new LinkedHashMap<>();

}
